package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.UniversityDto;
import xyz.zhouzhaodong.crm.service.IUniversityService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 高校信息 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-22
 */
@RestController
@RequestMapping("/university")
public class UniversityController {

    @Resource
    IUniversityService universityService;

    /**
     * 新增高校信息
     * @param universityDto
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addUniversity(UniversityDto universityDto){
        return universityService.addUniversity(universityDto);
    }

    /**
     * 删除高校信息
     * @param universityDto
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteUniversity(UniversityDto universityDto){
        return universityService.deleteUniversity(universityDto);
    }

    /**
     * 修改高校信息
     * @param universityDto
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateUniversity(UniversityDto universityDto){
        return universityService.updateUniversity(universityDto);
    }

    /**
     * 查询高校信息
     * @param universityDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectUniversity(UniversityDto universityDto){
        return universityService.selectUniversity(universityDto);
    }

    /**
     * 根据id查询高校信息
     * @param universityDto
     * @return
     */
    @RequestMapping("/selectById")
    public RestMessage selectUniversityById(UniversityDto universityDto){
        return universityService.selectUniversityById(universityDto);
    }

    /**
     * 查询高校的待沟通
     * @param universityDto
     * @return
     */
    @RequestMapping("/selectLinkUp")
    public RestMessage selectLinkUp(UniversityDto universityDto){
        return universityService.selectLinkUp(universityDto);
    }

}
